const List = () => import('../views/user/List.vue')
const Add = () => import('../views/user/Add.vue')
const Index = () => import('../views/Index.vue')

const userRoute = {
    path: '/user',
    component: Index,
    name: 'user',
    // 当访问/user时候自动跳转/user/list
    redirect: '/user/list',
    children: [
        {
            path: 'list',
            component: List,
            name: 'userList',
        },
        {
            path: 'add',
            component: Add,
            name: 'userAdd',
        }
    ]
}

export default userRoute